package com.acme.bankapp.domain.bank.exception;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public class InvalidClientException extends BankException {
    private final String clientName;

    public InvalidClientException(String clientName) {
        this.clientName = clientName;
    }

    public InvalidClientException(String message, String clientName) {
        super(message);
        this.clientName = clientName;
    }

    public InvalidClientException(String message, Throwable cause, String clientName) {
        super(message, cause);
        this.clientName = clientName;
    }

    public InvalidClientException(Throwable cause, String clientName) {
        super(cause);
        this.clientName = clientName;
    }

    @Override
    public String getMessage() {
        return "There is no such client: " + clientName;
    }
}
